﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Inventory.Master" AutoEventWireup="true"
    CodeBehind="Customers.aspx.cs" Inherits="InventryPro.Customers.Customers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="border: solid 1px black; width: 100%;">
        <table style="border: solid 1px black; width: 100%;">
            <tr>
                <td>
                    <asp:Label ID="lblCustomerId" runat="server" Text="Customer Id"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCustomerId" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblName" runat="server" Text="Name"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCustomername" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblContactName" runat="server" Text="Contact Name"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtContactName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblContactTitle" runat="server" Text="Contact Title"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtContactTitle" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblAddress" runat="server" Text="Address"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblCity" runat="server" Text="City"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblRegion" runat="server" Text="Region"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtRegion" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblPostalCode" runat="server" Text="Postal Code"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtPostalCode" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblCountry" runat="server" Text="Country"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCountry" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblPhone" runat="server" Text="Phone No"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtPhoneNumber" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblFax" runat="server" Text="Fax"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtFax" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                <asp:Button ID="btnSearch" runat="server" Text="Search" BorderStyle="Solid" OnClick="btnSearch_Click"
                                    ToolTip="Save customer" />
                            </td>
                            <td>
                                <asp:Button ID="btnClear" runat="server" Text="Clear" BorderStyle="Solid" OnClick="btnClear_click"
                                    ToolTip="Clear the values" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div id="gridViewControl" style="border: solid 1px black; width: 100%;">
        <table id="GridTable">
            <script type="text/javascript">
                $(function () {
                    $("#GridTable").flexigrid(
{
    url: '~/Customers/CreateCustomer.aspx',
    dataType: 'json',
    colModel: [
{ display: 'CustomerID', name: 'id', width: 40, sortable: true, align: 'left' },
{ display: 'First Name', name: 'first_name', width: 150, sortable: true, align: 'left' },
{ display: 'Surname', name: 'surname', width: 150, sortable: true, align: 'left' },
{ display: 'Position', name: 'email', width: 250, sortable: true, align: 'left' }
],
    buttons: [
{ name: 'Edit', bclass: 'edit', onpress: doCommand },
{ name: 'Delete', bclass: 'delete', onpress: doCommand },
{ separator: true }
],
    searchitems: [
{ display: 'First Name', name: 'first_name' },
{ display: 'Surname', name: 'surname', isdefault: true },
{ display: 'Position', name: 'position' }
],
    sortname: "id",
    sortorder: "asc",
    usepager: true,
    title: "Staff",
    useRp: true,
    rp: 10,
    showTableToggleBtn: false,
    resizable: false,
    width: 700,
    height: 370,
    singleSelect: true
}
);
                });
            </script>
        </table>
        <%--<asp:GridView ID="gridCustomer" runat="server" AllowPaging="True" AlternatingRowStyle-BackColor="ActiveBorder"
            AutoGenerateColumns="False" OnRowEditing="gridCustomer_RowEditing1">
            <Columns>
                <asp:TemplateField HeaderText="Child">
                    <ItemTemplate>
                        <asp:Button ID="ViewChild_Button" runat="server" Text="+" CommandName="Edit" />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Button ID="CancelChild_Button" runat="server" Text="-" CommandName="Cancel" />
                        Abhishek Child Grid Space....
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="CustomerID" HeaderText="Id" ReadOnly="True" />
                <asp:BoundField DataField="CompanyName" HeaderText="Company Name" ReadOnly="True" />
                <asp:BoundField DataField="ContactName" HeaderText="Contact Name" ReadOnly="True" />
                <asp:BoundField DataField="ContactTitle" HeaderText="Contact Title" ReadOnly="True" />
                <asp:BoundField DataField="Address" HeaderText="Address" ReadOnly="True" />
                <asp:BoundField DataField="City" HeaderText="City" ReadOnly="True" />
                <asp:BoundField DataField="Region" HeaderText="Region" ReadOnly="True" />
                <asp:BoundField DataField="PostalCode" HeaderText="Postal Code" ReadOnly="True" />
                <asp:BoundField DataField="Phone" HeaderText="Phone No" ReadOnly="True" />
                <asp:BoundField DataField="Fax" HeaderText="Fax" ReadOnly="True" />
                <%--  <asp:TemplateField HeaderText="PublisherID">
                    <ItemTemplate>
                        <asp:Label ID="lblPublisher" runat="Server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Name">
                    <ItemTemplate>
                        <asp:Label ID="name_lbl" runat="Server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Contact Name">
                    <ItemTemplate>
                        <asp:Label ID="conatct_name" runat="Server"  />
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Contact Title">
                    <ItemTemplate>
                        <asp:Label ID="conatct_title" runat="Server"  />
                    </ItemTemplate>
                </asp:TemplateField>

                 <asp:TemplateField  HeaderText="Address">
                    <ItemTemplate>
                        <asp:Label  ID="address" runat="Server"  />
                    </ItemTemplate>
                </asp:TemplateField>--%>
        <%-- <asp:BoundField  DataField="CustomerID" HeaderText="Id" 
         ReadOnly="True" />
         <asp:BoundField  DataField="CompanyName" HeaderText="Company Name" 
         ReadOnly="True" />         
          <asp:BoundField  DataField="ContactName" HeaderText="Contact Name" 
         ReadOnly="True" />
          <asp:BoundField  DataField="ContactTitle" HeaderText="Contact Title" 
         ReadOnly="True" />
           <asp:BoundField  DataField="Address" HeaderText="Address" 
         ReadOnly="True" />
          <asp:BoundField  DataField="City" HeaderText="City" 
         ReadOnly="True" />
          <asp:BoundField  DataField="Region" HeaderText="Region" 
         ReadOnly="True" />
           <asp:BoundField  DataField="PostalCode" HeaderText="Postal Code" 
         ReadOnly="True" />
          <asp:BoundField  DataField="Phone" HeaderText="Phone No" 
         ReadOnly="True" />
           <asp:BoundField  DataField="Fax" HeaderText="Fax" 
         ReadOnly="True" />--%>
        <%--</Columns>
        </asp:GridView>--%>
    </div>
</asp:Content>
